﻿<Page
    x:Class="metroCIS.Win8Application.Views.LvInfoView"
    IsTabStop="false"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:metroCIS.Win8Application.Views"
    xmlns:vm="using:metroCIS.ViewModel"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Page.DataContext>
        <vm:LvInfoViewModel />
    </Page.DataContext>
    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.3*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <ListBox ItemsSource="{Binding Lessons}" x:Name="lbLessons">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Border Padding="10">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <TextBlock FontSize="20" FontWeight="Bold"  Grid.Row="0" Text="{Binding Title}"/>
                            <TextBlock FontSize="20" Grid.Row="1" Text="{Binding Lektor}"/>
                        </Grid>
                    </Border>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <WebView x:Name="_webView" Grid.Column="1" Source="{Binding SelectedItem.LVInforation,ElementName=lbLessons}"/>
    </Grid>
</Page>